﻿@{
    ViewBag.Title = "Photos";
}
@section head{
    <script src="/Scripts/Company/company.photo.grid.js?@CommonSetting.JsVersion"></script>
    <script type="text/javascript">
        $(function () {
            $(".ifunny_img_wrapper").click(function () {
                $(this).toggleClass("ifunny_img_wrapper_border");
            });
        });

    </script>
    <style type="text/css">
        .ifunny_img_wrapper {
            float: left;
            display: inline;
            width: 205px;
            height: 215px;
            border: 1px solid #ccc;
            position: relative;
            cursor: pointer;
            margin: 5px 10px 5px 1px;
        }

        .ifunny_img {
            width: 180px;
            height: 160px;
            margin: 10px auto;
        }

            .ifunny_img img {
                border: none;
                width: 180px;
                height: 160px;
            }

        .ifunny_img_title {
            line-height: 26px;
            text-align: center;
            font-weight: bold;
        }

        .ifunny_img_wrapper_border {
            border: 1px solid rgb(243,185,60);
            background: #f7f6f6;
            background-image: url(/Images/accept.png);
            background-repeat: no-repeat;
            background-position: 178px 185px;
        }


        /*
分页控件样式开始
*/
        .pagination {
            margin-top:20px;
        }
        .pages {
            color: #999999;
            font-size: 12px;
            padding-bottom: 5px;
        }

            .pages .item a {
                padding: 3px 8px;
                font-size: 13px;
            }
            /*数字页索引样式*/
            .pages .cpb {
                color: rgb(247,148,29);
                border: 1px solid rgb(243,185,60);
                background: #f7f6f6;
                padding: 3px 8px;
                font-size: 13px;
            }
            /*当前页样式*/
            /*ie6跳转txt样式*/
            .pages .gotoPage input {
                width: expression((this.type=="text") ? "30px" : "style");
            }

                .pages .gotoPage input[type="text"] {
                    width: 30px;
                    height: 18px;
                }

                .pages .gotoPage input[type="button"] {
                    width: 44px;
                    height: 23px;
                    cursor: pointer;
                    color: #999999;
                    background-color: #FFFFFF;
                    border: 1px solid #ccc;
                    font-size: 13px;
                }

                    .pages .gotoPage input[type="button"]:hover {
                        width: 44px;
                        height: 23px;
                        cursor: pointer;
                        color: rgb(247,148,29);
                border: 1px solid rgb(243,185,60);
                background: #f7f6f6;
                        font-size: 13px;
                    }
            /*ie6跳转button样式*/
            .pages .gotoPage input {background-color: expression((this.type=="button") ? "#FFFFFF" : "style");color: expression((this.type=="button") ? "#999999" : "style");cursor: expression((this.type=="button") ? "pointer" : "style");}

            .pages a {
                text-decoration: none;
                padding: 3px 8px;
                border: 1px solid #ccc;
                margin: 0 2px;
                color: #999;
                font-weight: normal;
                font-size: 13px;
            }

                

                .pages a:hover {
                    color: rgb(247,148,29);
                border: 1px solid rgb(243,185,60);
                background: #f7f6f6;
                    text-decoration: none;
                    font-weight: normal;
                }
        /*
分页控件样式结束
*/
    </style>
}
@model PagedList<PhotoVM>
<div id="header" class="header">
    <h4>图片管理</h4>
</div>


<div id="toolbar" style="margin-top: 10px;"></div>

<div id="grid" class="clearfix" style="margin-top: 10px;">

    @if (Model != null && Model.Count > 0)
    {
        foreach (var item in Model)
        {
        <div class="ifunny_img_wrapper ">
            <div class="ifunny_img">
                <img src="@item.PhotoUrl" alt="@item.PhotoTitle" title="@item.PhotoTitle" />
            </div>
            <div class="ifunny_img_title">
                <span>@item.PhotoTitle</span>
            </div>
        </div>
        }
    }


</div>

<div class="pagination clearfix">
    @Html.Pager(Model, new PagerOptions{
    PageIndexParameterName = "page",
    CurrentPagerItemWrapperFormatString = "<span class=\"cpb\">{0}</span>",
    NumericPagerItemWrapperFormatString = "<span class=\"item\">{0}</span>", 
    ShowPageIndexBox = false,
    ShowFirstLast = false, 
    NumericPagerItemCount= 8, 
    PageIndexBoxWrapperFormatString = "到第 {0} 页  ",
    GoToPageSectionWrapperFormatString = "<span class=\"gotoPage\">{0}</span>", 
    CssClass = "pages",
    SeparatorHtml = ""}) 
</div>

 

<input type="hidden" value="@ViewBag.AlbumId" id="albumId" />